﻿@model DPW.Models.PoemDetailViewModel

@{
    ViewBag.Title = @Model.Poem.Name;
}



<div class="main-content container-fluid">
		<div class="row-fluid">
			<div class="span3 left-sidebar">
				<div class="side-wrapper  category">
					<ul class="nav nav-list">
					  <li class="nav-header">Categories</li>
					  <li class="divider"></li>
					  @*<li class="active"><a href="#">Humour</a></li>*@
                      @foreach (var cat in Model.Categories)
                      {
                          if (cat.Id == Model.Category.Id)
                          {
                              <li class="active"><a href="/c/@cat.Id" >@cat.Name (@cat.Poems.Count())</a></li>
                          }
                          else
                          {
                              <li><a href="/c/@cat.Id" >@cat.Name (@cat.Poems.Count())</a></li>
                          }
                      }
					</ul>
				</div>
				
				<div style="padding: 8px 0px;" class="side-wrapper  lastest">
					<ul class="nav nav-list">
					  <li class="nav-header">Latest</li>
					  <li class="divider"></li>
                      @foreach (var latestPoem in Model.LatestPoems)
                      {
                          <li><a href="/p/@latestPoem.Id" >@latestPoem.Name</a></li>

                      }
					  <li class="divider"></li>					  
					</ul>
					<div class="view-all">
						<a style="text-align: right" href="#">View All</a>
					</div>
				</div>
				
				<div style="padding: 8px 0px;" class="side-wrapper  random">
					<ul class="nav nav-list">
					  <li class="nav-header">Most Viewed Poems</li>
					  <li class="divider"></li>
					  @foreach (var mostViewedPoem in Model.MostViewedPoems)
                        {
                          <li><a href="/p/@mostViewedPoem.Id" >@mostViewedPoem.Name</a></li>

                        }
					  <li class="divider"></li>					  
					</ul>
					<div class="view-all">
						<a style="text-align: right" href="#">View All</a>
					</div>
				</div>
				
				
			</div>

			<div class="span9 right-sidebar">	
				<div class="row-fluid">

                <ul class="breadcrumb">
                  <li>@Html.ActionLink("Home", "Index", "Home") <span class="divider">/</span></li>
                  <li><a href="/c/@Model.Category.Id" >@Model.Category.Name</a> <span class="divider">/</span></li>
                  <li class="active">@Model.Poem.Name</li>
                </ul>

				<section id="poem" class="poem">
					<div class="poem-content container-fluid">
						<div class="poem-header row-fluid">
							@*<div class=" span3">
								<img src="img/view.jpg" class="poem-avata">
							</div>*@
							<div class="poem-tittle">
								<h2>@Model.Poem.Name</h2>
							</div>
						</div>
						<div class="poem-body row-fluid">
							<p>
							    @Html.Raw(HttpUtility.HtmlDecode(Model.Poem.Content))
							</p>
						</div>
                        <div class="poem-footer row-fluid">
                            @if (!string.IsNullOrEmpty(Model.Poem.Author) && !string.IsNullOrEmpty(Model.Poem.DateCreatedDisplay))
                            {
                                <p class="text-info text-right">
                                <small>posted by <b>@Model.Poem.Author</b> at <b>@Model.Poem.DateCreatedDisplay</b></small>
                                </p>
                            }
                            
                        </div>
					</div>
				</section>
				
                @if (Model.NewerPoems.Count() > 0)
                {
				<ul class="nav nav-list otherpost">
					<li class="nav-header">New posts</li>
					  
					@foreach (var newerPoem in Model.NewerPoems)
                    {
                        <li><a href="/p/@newerPoem.Id" ><img src="../../Images/bullet.png" />@newerPoem.Name  |  <small class="muted"> @newerPoem.DateCreatedShortDisplay</small></a></li>
                    }
				</ul>
                }
                @if (Model.OlderPoems.Count() > 0)
                {
				<ul class="nav nav-list otherpost">
					  <li class="nav-header">Others posts</li>
					    @foreach (var olderPoem in Model.OlderPoems)
                        {
                         <li><a href="/p/@olderPoem.Id" ><img src="../../Images/bullet.png" />@olderPoem.Name  |  <small class="muted">@olderPoem.DateCreatedShortDisplay</small></a></li>
                        }
                        <li class="divider"></li>
					</ul>
                }

				
				</div>
			</div>
		</div>
	</div>